import request from "@/utils/request";

//1.查询品牌列表
//请求参数类型的限制
export interface reqTrademarkParamsType{
    page:number;
    limit:number;
}
//返回值类型限制
export interface reqTrademarkReturnItemType extends reqAddTradeParamsType {
    id:number;
};
//records 数据类型
export type reqTrademarkReturnRecordsType = reqTrademarkReturnItemType[];
export interface reqTrademarkReturnType {
    records:reqTrademarkReturnRecordsType;
    total:number;
    size:number;
    current:number;
    searchCount:boolean;
    pages:number;
}
//品牌列表请求
export const  requestTrademarkList = ({page,limit}:reqTrademarkParamsType) =>{
    return request.get<any,reqTrademarkReturnType>(`/admin/product/baseTrademark/${page}/${limit}`)
}

//4.新增品牌
export interface reqAddTradeParamsType {
    tmName:string;
    logoUrl:string;
}